<template>
<el-calendar>
              <!-- 这里使用的是 2.5 slot 语法，对于新项目请使用 2.6 slot 语法-->
              <template slot="dateCell" slot-scope="{date, data}">
                <p> <!--这里原本有动态绑定的class，去掉-->
                  {{ data.day.split('-').slice(1).join('-') }}<br /> {{dealMyDate(data.day)}}
                </p>
              </template>
            </el-calendar>
</template>

<script>
export default {
    data() {
        return {
            resDate: [
                {"date":"2020-11-20","content":"宽松考核"},
                {"date":"2020-11-01","content":"周末考核"},
                {"date":"2020-11-02","content":"日常考核"}
            ]
        }
    },
    methods:{
        dealMyDate(v) {
            console.log(v)
            let len = this.resDate.length
            let res = ""
            for(let i=0; i<len; i++){
                if(this.resDate[i].date == v) {
                    res = this.resDate[i].content
                    break
                }
            }
            console.log("00000=="+res);
            return res
        }
    }
}
</script>
<style>
  .is-selected {
    color: #fa192c;
  }
</style>